﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp_AutoFac
{
    public interface ISay
    {
        string GuidIdentity { get; }
        void Say();
    }

    public class People : ISay
    {
        public void Say()
        {
            Console.WriteLine($"{DateTime.Now} I am People.{GuidIdentity}");
        }
        string guidIdentity = Guid.NewGuid().ToString();

        public string GuidIdentity => guidIdentity;
    }

    public class Dog : ISay
    {
        public void Say()
        {
            Console.WriteLine($"{DateTime.Now} this is Dog.{GuidIdentity}");
        }
        string guidIdentity = Guid.NewGuid().ToString();

        public string GuidIdentity => guidIdentity;
    }

    public class Cat : ISay
    {
        public void Say()
        {
            Console.WriteLine($"{DateTime.Now} this is Cat.{GuidIdentity}");
        }
        string guidIdentity = Guid.NewGuid().ToString();

        public string GuidIdentity => guidIdentity;
    }

    public class Chicken : ISay {
        string guidIdentity = Guid.NewGuid().ToString();

        public string GuidIdentity => guidIdentity;
        public int Age { get; set; }
        public string Name { get; set; }

        public Chicken(int age,string name)
        {
            this.Age = age;
            this.Name = name;
        }
        public void Say()
        {
            Console.WriteLine($"{GuidIdentity} 鸡鸡   {Name}--{Age}");
        }
    }
}
